package com.open.harmony.business.mapper;


import com.open.harmony.business.entity.Product;
import io.swagger.models.auth.In;
import org.apache.ibatis.annotations.*;

import java.security.PublicKey;
import java.util.List;

@Mapper
//@Repository
public interface ProductMapper {
   @Select("select * from product")
   List<Product> findAll();

   @Select("select * from product where product_store_id = #{storeId}")
   List<Product> findAllByStoreId(Integer storeId);

   Integer insertProduct(Product product);

   Integer updateProduct(Product product);

   @Update("update product set product_status = 1 where product_id = #{productId}")
   Integer deleteProduct(Integer productId);


}
